<!--<%@ include file="/inc/taglibs.jsp"%>-->
<!--<%@ page contentType="text/html;charset=UTF-8" language="java" %>-->
<html lang="en">
<head>

    <!-- start: Meta -->
    <meta charset="utf-8">
    <title></title>
    <!-- end: Meta -->

    <!-- start: Mobile Specific -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- end: Mobile Specific -->

    <!-- start: CSS -->
    
    <link rel="stylesheet" type="text/css" href="css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <link rel="stylesheet" type="text/css" href="css/style-responsive.css"/>
    <link rel="stylesheet" type="text/css" href="css/nav.css"/>
    <link rel="stylesheet" type="text/css" href="css/loading.css"/>
    <!-- end: CSS -->

    <!-- start: JavaScript-->
    <!--<script src="../js/jquery-1.9.1.min.js"></script>
    <script src="../js/jquery-migrate-1.0.0.min.js"></script>
    <script src="../js/jquery-ui-1.10.0.custom.min.js"></script>
    <script src="../js/jquery.ui.touch-punch.js"></script>
    <script src="../js/modernizr.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/jquery.cookie.js"></script>
    <script src='../js/fullcalendar.min.js'></script>
    <script src='../js/jquery.dataTables.min.js'></script>
    <script src="../js/excanvas.js"></script>
    <script src="../js/jquery.flot.js"></script>
    <script src="../js/jquery.flot.pie.js"></script>
    <script src="../js/jquery.flot.stack.js"></script>
    <script src="../js/jquery.flot.resize.min.js"></script>
    <script src="../js/jquery.chosen.min.js"></script>
    <script src="../js/jquery.uniform.min.js"></script>
    <script src="../js/jquery.cleditor.min.js"></script>
    <script src="../js/jquery.noty.js"></script>
    <script src="../js/jquery.elfinder.min.js"></script>
    <script src="../js/jquery.raty.min.js"></script>
    <script src="../js/jquery.iphone.toggle.js"></script>
    <script src="../js/jquery.uploadify-3.1.min.js"></script>
    <script src="../js/jquery.gritter.min.js"></script>
    <script src="../js/jquery.imagesloaded.js"></script>
    <script src="../js/jquery.masonry.min.js"></script>
    <script src="../js/jquery.knob.modified.js"></script>
    <script src="../js/jquery.sparkline.min.js"></script>
    <script src="../js/counter.js"></script>
    <script src="../js/retina.js"></script>
    <script src="../js/custom.js"></script>
    <script src="../js/loading.js"></script>-->
    
    <!--<script src="../js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/jquery-migrate-1.0.0.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/jquery-ui-1.10.0.custom.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="" type="text/javascript" charset="utf-8"></script>-->
    	
    	
    <!-- end: JavaScript-->

    <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <link id="ie-style" href="<c:url value="/css/ie.css"/>" rel="stylesheet">
    <![endif]-->

    <!--[if IE 9]>
    <link id="ie9style" href="<c:url value="/css/ie9.css"/>" rel="stylesheet">
    <![endif]-->

    <!--<script type="text/javascript">

        var load = new Loading();

        function gotoUrl(url) {
            $("#mainiframe").attr("src",url);
        }

        function logout() {

            $.ajax({

                url:"<c:url value="/admin/admin/logout"/>",
                type:"post",
                dataType:"json",
                scriptCharset:"utf-8",
                success:function(json){
                    if(json.code=="0") {
                        location.href = '/';
                    }
                }

            });
        }

        function stop() {
            load.stop();
        }

        $(function() {

            $(".nav li.child a").click(function (){
                load.init({
                    target: "#mainiframe"
                });
                load.start();
                gotoUrl($(this).attr("url"));
            });

        });
    </script>-->

</head>

<body>
<!-- start: Header -->
<div class="navbar" style="display: none;">
    <div class="navbar-inner">
        <div class="container-fluid">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".top-nav.nav-collapse,.sidebar-nav.nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
        </div>
    </div>
</div>
<!-- start: Header -->
<style type="text/css">
/*.container-fluid-full {width:960px; height:100%; overflow:hidden; margin:0 auto;}
/*.row-fluid {height:100%; width:100px; overflow:hidden;background: powderblue;word-break: break-all; padding-bottom:9999px; margin-bottom:-9999px; float:left;}*/
/*iframe {width:100px; float:left; height:auto;background: pink;word-break: break-all;}*/
</style>
<div class="container-fluid-full">
    <div class="row-fluid">

        <!-- start: Main Menu -->
        <div id="sidebar-left" class="span2" style="overflow-y: auto;position: fixed;">
            <div class="nav-collapse sidebar-nav">
                <ul class="nav nav-tabs nav-stacked main-menu">
                    <li class="oms">OMS 系统</li>
                    <li class="parent">
                        <a class="dropmenu kehu"><span class="hidden-tablet">客户CRM</span></a>
                        <ul class="kehubox">
                            <li class="child customerCRM"><a /><span class="hidden-tablet">客户管理</span></a></li>
                            <li class="child supplier"><a /><span class="hidden-tablet">供应商管理</span></a></li>
                            <li class="child driverList"><a /><span class="hidden-tablet">司机管理</span></a></li>
                        </ul>
                    </li>
                    <li class="parent">
                        <a class="dropmenu yundan"><span class="hidden-tablet">运单管理</span></a>
                        <ul class="yundanbox">
                            <li class="child billList"><a /><span class="hidden-tablet">运单列表</span></a></li>
                            <li class="child billEdit"><a /><span class="hidden-tablet">填开运单</span></a></li>
                            <li class="child billCheck"><a /><span class="hidden-tablet">查单管理</span></a></li>
                            <li class="child invoiceList"><a /><span class="hidden-tablet">保险管理</span></a></li>
                        </ul>
                    </li>
                    <li class="parent">
                        <a class="dropmenu yupei"><span class="hidden-tablet">预配管理</span></a>
                        <ul class="yupeibox">
                            <li class="child deliverBillList"><a /><span class="hidden-tablet">预配列表</span></a></li>
                            <li class="child deliverBillEdit"><a /><span class="hidden-tablet">填开预配</span></a></li>
                        </ul>
                    </li>
                    <li class="parent">
                        <a class="dropmenu peizai"><span class="hidden-tablet">配载管理</span></a>
                        <ul class="peizaibox">
                            <li class="child deliverBillList2"><a /><span class="hidden-tablet">配载列表</span></a></li>
                            <li class="child deliverBillEdit2"><a /><span class="hidden-tablet">填开配载</span></a></li>
                        </ul>
                    </li>
                    <li class="parent">
                        <a class="dropmenu jizhang"><span class="hidden-tablet">记账管理</span></a>
                        <ul class="jizhangbox">
                            <li class="child customerCRMfinance"><a /><span class="hidden-tablet">客户账目</span></a></li>
                            <li class="child supplierfinance"><a /><span class="hidden-tablet">供应商账目</span></a></li>
                        </ul>
                    </li>
                    <!--<%--<li class="parent">
                        <a class="dropmenu"><span class="hidden-tablet">财务管理</span></a>
                        <ul>
                            <li class="child"><a><span class="hidden-tablet">开单结算</span></a></li>
                            <li class="child"><a><span class="hidden-tablet">代收货款管理</span></a></li>
                            <li class="child"><a><span class="hidden-tablet">运费管理</span></a></li>
                        </ul>
                    </li>--%>-->
                    <li class="parent">
                        <a class="dropmenu cangku"><span class="hidden-tablet">仓库管理</span></a>
                        <ul class="cangkubox">
                            <li class="child type"><a /><span class="hidden-tablet">品类管理</span></a></li>
                            <li class="child skuList"><a /><span class="hidden-tablet">产品档案</span></a></li>
                            <li class="child whLotList"><a /><span class="hidden-tablet">库存管理</span></a></li>
                            <li class="child whInList"><a /><span class="hidden-tablet">入库管理</span></a></li>
                            <li class="child whOutList"><a /><span class="hidden-tablet">出库管理</span></a></li>
                        </ul>
                    </li>
                    <li class="parent">
                        <a class="dropmenu xitong"><span class="hidden-tablet">系统设置</span></a>
                        <ul class="xitongbox">
                            <li class="child config"><a /><span class="hidden-tablet">参数设置</span></a></li>
                            <li class="child address"><a /><span class="hidden-tablet">常用地址</span></a></li>
                            <%--<li class="child"><a><span class="hidden-tablet">账号管理</span></a></li>
                            <li class="child"><a><span class="hidden-tablet">权限角色</span></a></li>--%>
                        </ul>
                    </li>
                    <li class="parent">
                        <a class="dropmenu huishou"><span class="hidden-tablet">回收站</span></a>
                        <ul class="huishoubox">
                            <li class="child deleteBillList"><a /><span class="hidden-tablet">回收运单</span></a></li>
                        </ul>
                    </li>
		            <li class="exit">
		                <a onclick="logout()">退出登录</a>
		            </li>
                </ul>
            </div>
        </div>
        <!-- end: Main Menu -->

        <!-- start: Content -->
<!--<iframe id="mainFrame" src="bill/billList.html" onreadystatechange="stateChangeIE(this)" onload="stateChangeFirefox(this)" frameborder="0" style="width: 85.5%;height:100%;margin-left: 14.53%;"></iframe>-->
<iframe src="customer/customerCRM.html" id="mainFrame" onreadystatechange="stateChangeIE(this)" onload="stateChangeFirefox(this)" style="width: 85.5%; height: 100%;margin-left: 14.53%;" frameborder="0" scrolling="yes"></iframe>
<script type="text/javascript">
	function stateChangeIE(_frame)
    {
         if (_frame.readyState=="complete")//state: loading ,interactive,   complete
         {
             AutoHeight();
         }  
    }

    function stateChangeFirefox(_frame)
    {  
        AutoHeight();
    }

   

    function AutoHeight()
    {
        if(document.readyState!='complete')
        {
            setTimeout( function(){AutoHeight();},50 );
            return;
        }
        else
        {
            try
            {   //IE、fireFox下测试通过
                var ifobj=document.getElementById("mainFrame");
                ifobj.style.height = ifobj.contentWindow.document.body.scrollHeight + 0 + "px";
            }   //注意，别忘了加最后那个"px",不然fireFox下就不起作用了
                //加的那0是为了让非IE浏览器高度不会一直增加
            catch(e)
            {}
        }
    }
</script>
<script type="text/javascript">

	//侧边栏的激活类
	function ac(){
		var a = document.querySelectorAll(".child a span");
		for(var i=0;i<a.length;i++){
			a[i].addEventListener("click",function(){
//				console.log(a[i])
				for(var j=0;j<a.length;j++){
//					a[j].classList.remove("ac")
//					a[j].style.color="white"
				}
//				a[i].classList.add("ac")
//				a[i].style.color="#37c2c2"
			})
		}
	}
	ac()
	//侧边栏的展开
	function zankai(){
		var kehu = document.querySelector(".kehu");
		var kehubox = document.querySelector(".kehubox");
		var yundan = document.querySelector(".yundan");
		var yundanbox = document.querySelector(".yundanbox");
		var yupei = document.querySelector(".yupei");
		var yupeibox = document.querySelector(".yupeibox");
		var peizai = document.querySelector(".peizai");
		var peizaibox = document.querySelector(".peizaibox");
		var jizhang = document.querySelector(".jizhang");
		var jizhangbox = document.querySelector(".jizhangbox");
		var cangku = document.querySelector(".cangku");
		var cangkubox = document.querySelector(".cangkubox");
		var xitong = document.querySelector(".xitong");
		var xitongbox = document.querySelector(".xitongbox");
		var huishou = document.querySelector(".huishou");
		var huishoubox = document.querySelector(".huishoubox");
		kehu.addEventListener("click",function(){
			if(kehubox.style.display=="block"){
				kehubox.style.display='none';
			}else{
				kehubox.style.display='block';
			}
		});
		yundan.addEventListener("click",function(){
			if(yundanbox.style.display=="block"){
				yundanbox.style.display='none';
			}else{
				yundanbox.style.display='block';
			}
		});
		yupei.addEventListener("click",function(){
			if(yupeibox.style.display=="block"){
				yupeibox.style.display='none';
			}else{
				yupeibox.style.display='block';
			}
		});
		peizai.addEventListener("click",function(){
			if(peizaibox.style.display=="block"){
				peizaibox.style.display='none';
			}else{
				peizaibox.style.display='block';
			}
		});
		jizhang.addEventListener("click",function(){
			if(jizhangbox.style.display=="block"){
				jizhangbox.style.display='none';
			}else{
				jizhangbox.style.display='block';
			}
		});
		cangku.addEventListener("click",function(){
			if(cangkubox.style.display=="block"){
				cangkubox.style.display='none';
			}else{
				cangkubox.style.display='block';
			}
		});
		xitong.addEventListener("click",function(){
			if(xitongbox.style.display=="block"){
				xitongbox.style.display='none';
			}else{
				xitongbox.style.display='block';
			}
		});
		huishou.addEventListener("click",function(){
			if(huishoubox.style.display=="block"){
				huishoubox.style.display='none';
			}else{
				huishoubox.style.display='block';
			}
		})
	}
	zankai()
	//改变iframe的src
	window.onload=function(){
	    var customerCRM=document.querySelector(".customerCRM");
	    var supplier = document.querySelector(".supplier");
	    var driverList = document.querySelector(".driverList");
	    var billList = document.querySelector(".billList");
	    var billEdit = document.querySelector(".billEdit");
	    var billCheck = document.querySelector(".billCheck");
	    var invoiceList = document.querySelector(".invoiceList");
	    var deliverBillList = document.querySelector(".deliverBillList");
	    var deliverBillEdit = document.querySelector(".deliverBillEdit");
	    var deliverBillList2 = document.querySelector(".deliverBillList2");
	    var deliverBillEdit2 = document.querySelector(".deliverBillEdit2");
	    var customerCRMfinance = document.querySelector(".customerCRMfinance");
	    var supplierfinance = document.querySelector(".supplierfinance");
	    var type = document.querySelector(".type");
	    var skuList = document.querySelector(".skuList");
	    var whInList = document.querySelector(".whInList");
	    var whOutList = document.querySelector(".whOutList");
	    var config = document.querySelector(".config");
	    var address = document.querySelector(".address");
	    var deleteBillList = document.querySelector(".deleteBillList");
	    
	    var iframe=document.getElementById("mainFrame");
	    customerCRM.onclick=function(){
	    	console.log(iframe);
	        iframe.src="customer/customerCRM.html";
	    };
	    supplier.onclick=function(){
	        iframe.src="customer/supplierlist.html";
	    };
	    driverList.onclick=function(){
	        iframe.src="customer/driverList.html";
	    };
	    billList.onclick=function(){
	        iframe.src="bill/billList.html";
	    };
	    billEdit.onclick=function(){
	        iframe.src="bill/billEdit.html";
	    };
	    billCheck.onclick=function(){
	        iframe.src="bill/billCheck.html";
	    };
	    invoiceList.onclick=function(){
	        iframe.src="bill/invoiceList.html";
	    };
	    deliverBillList.onclick=function(){
	        iframe.src="deliverBill/deliverBillList.html";
	    };
	    deliverBillEdit.onclick=function(){
	        iframe.src="deliverBill/deliverBillEdit2.html";
	    };
	    deliverBillList2.onclick=function(){
	        iframe.src="deliverBill/deliverBillList2.html";
	    };
	    deliverBillEdit2.onclick=function(){
	        iframe.src="deliverBill/deliverBillEdit.html";
	    };
	    customerCRMfinance.onclick=function(){
	        iframe.src="customer/financelist.html";
	    };
	    supplierfinance.onclick=function(){
	        iframe.src="customer/financelist2.html";
	    };
	    type.onclick=function(){
	        iframe.src="wh/parentType.html";
	    };
	    skuList.onclick=function(){
	        iframe.src="wh/skuList.html";
	    };
	    whInList.onclick=function(){
	        iframe.src="wh/whInList.html";
	    };
	    whOutList.onclick=function(){
	        iframe.src="wh/whOutList.html";
	    };
	    config.onclick=function(){
	        iframe.src="sys/config.html";
	    };
	    address.onclick=function(){
	        iframe.src="sys/address.html";
	    };
	    deleteBillList.onclick=function(){
	        iframe.src="recycle/recycle.html";
	    };
	}
	
	
	
</script>
        
        	
        <!-- end: Content -->

    </div><!--/#content.span10-->
</div><!--/fluid-row-->

</body>
</html>
